/**
 * Created by zhaojm on 15/3/17.
 */
// 障碍物
game.BaseBarrier = cc.Node.extend({
    _barrierSprite:null,
    ctor:function(){
        this._super();

        var type = this.getBarrierType();

        this._barrierSprite = new cc.Sprite(cc.spriteFrameCache.getSpriteFrame("barrier/" + type + ".png"));
        this._barrierSprite.setAnchorPoint(cc.p(0, 0));
        this.addChild(this._barrierSprite);
        this.setContentSize(this._barrierSprite.getContentSize());

        this.setScale(game.ConfigHelper.getBarrierScale());

    },

    getBarrierType : function(){
        return Math.floor(Math.random()*3);  // 0-2
    },



});